/**
 * 定义天报表模块
 */
(function(window, angular, undefined){
	var module = angular.module('water.apps.zhuhai.operationLog.operationLogManager', ['RemoteControlController']);
	
	module.controller('OperationLogController',function($scope,$monitorDataService,$controller,$dateUtil){
		//监听左侧列表
		$scope.queryObject={};
	    $scope.$on('dataPramChanged', function(event, data) {
	    	if($scope.firstQuery){
				$scope.allStationSelected = false;
			}
			else{
				$scope.allStationSelected = false;
			}
			$scope.firstQuery = false;
	    	$wdp.viewValue.wwtpDetailParm = data;
			$scope.STATION_NAME=$wdp.viewValue.wwtpDetailParm.STATION_NAME;
			$scope.STATION_ID = $wdp.viewValue.wwtpDetailParm.MN;
			$scope.queryObject.mn = $scope.STATION_ID;
			if($scope.allStationSelected==true){
				$scope.queryObject.mn="";
			}
			$scope.queryOperationLog();
	    });
		$scope.queryOperationLog=function(){
			if($scope.startTime!=null && $scope.endTime) {
				if(!($waterDataCommon.judgmentDate($scope.startTime,$scope.endTime))){
					$.messager.alert("提示","结束日期不能小于开始日期");
					return;
				}
			}
			$scope.queryObject.startTime = $scope.startTime;
			$scope.queryObject.endTime = $scope.endTime;
			$scope.queryObject.mn = $scope.STATION_ID;
			if($scope.allStationSelected==true){
				$scope.queryObject.mn="";
			}
			$waterDataCommon.getPageRows("/OperationLog/getoperationLog.do","operationLogList",$scope.queryObject,20,1,function(d){	
				
			});
		};
	});
}(window, angular));